<?php

namespace app\api\model;

use app\common\model\Advert as AdvertModel;

/**
 * 商品评价模型
 * Class Article
 * @package app\api\model
 */
class Advert extends AdvertModel
{
    /**
     * @desc 获取广告列表
     * @param int $category_id
     * @param int $limit
     * @return \think\Paginator
     * @throws \think\exception\DbException
     */
    public static function getList()
    {
        $list = self::field('advert_id,advert_name,image_id,article_id,status,goods_id')
                ->with(['image'=>function($query){$query->field('file_id,storage,file_name');}])
                ->order('sort desc')
                ->select();
        return $list;
    }

}